/*
 * @Description  : 请求封装
 * @Author       : Keyman
 * @Date         : 2025-11-05 19:27:03
 * @LastEditors  : Keyman
 * @LastEditTime : 2025-11-05 19:36:06
 */

import http from "./http.ts";
interface ApiResponse {
  code: number;
  data: any;
  message: string;
}

export function get(url: string, params?: any): Promise<ApiResponse> {
  return http.get(url, { params });
}

export function post(url: string, data?: any): Promise<ApiResponse> {
  return http.post(url, data);
}
